package com.example.amusic.screen

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Modifier
import androidx.navigation.compose.rememberNavController
import com.example.amusic.viewmodel.MainViewModel
import com.example.amusic.utils.LocalNavController
import com.example.amusic.viewmodel.PlayViewModel

@Composable
fun Home(mainViewModel: MainViewModel, playViewModel: PlayViewModel) {
    val navController = rememberNavController()
    CompositionLocalProvider(
        LocalNavController provides navController,
        content = {
            NavGraph(
                modifier = Modifier.fillMaxSize(),
                mainViewModel = mainViewModel,
                playViewModel = playViewModel
            )
        }
    )
}